package ljl.alg.wangzheng_camp.round1.bisection;

public class _162_find_peek {
    
    /*
     * 故意写的很简短、很难以理解
     * */
    public int findPeakElement(int[] nums) {
        int l = 0, r = nums.length - 1, mid;
        while (l < r) if (nums[(mid = (l + r) >>> 1)] < nums[mid + 1]) l = mid + 1; else r = mid;
        return l;
    }
    
}
